home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17489 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.8 KB  |  87 lines

  1. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  2. Path: in2.uu.net!allegra!alice!ark
  3. From: ark@research.att.com (Andrew Koenig)
  4. Subject: Re: Will Java kill C++?
  5. Message-ID: <Dpx5K4.Jnr@research.att.com>
  6. Organization: AT&T Research, Murray Hill NJ
  7. References: <4ks0c8$jte@piglet.cc.uic.edu> <DpvsE5.2HC@research.att.com> <4ktqv7$1ueu@piglet.cc.uic.edu>
  8. Date: Mon, 15 Apr 1996 19:45:39 GMT
  9.  
  10. In article <4ktqv7$1ueu@piglet.cc.uic.edu> dhanle2@icarus.cc.uic.edu (David James Hanley) writes:
  11.  
  12. > : In order for a standard to have any meaning at all, that standard has
  13. > : to specify the behavior of something.  Moreover, any standard has to
  14. > : do so in a way that makes it possible to determine whether that 
  15. > : something meets the requirements of the standard or not.
  16.  
  17. >     Sure.  I gues this is so hard that standards are never 
  18. > made, eh?
  19.  
  20. There are many things for which standards are not made, precisely
  21. because it is impossible to detect conformance or nonconformance
  22. to specifications for such things.
  23.  
  24. As a simple example, the C standard says that implementations are
  25. required to produce diagnostic messages when presented with programs
  26. that contain certain kinds of errors.  The standard does not say,
  27. however, that the messages must correctly describe the errors.  The
  28. reason for that is that there is no objective way to determine whether
  29. a particular diagnostic message is correct.  It might be possible to
  30. determine correctness for some messages, but no general decision
  31. procedure is known.
  32.  
  33. > : Now, suppose a name-mangling standard existed.  What would it
  34. > : specify the behavior of?  Linkers?  What is a linker?  What if I
  35. > : give you a C++ implementation that has no linker at all?  Would you
  36. > : claim that such an implementation cannot be standard conforming
  37. > : because it does not have mangled names for you to inspect?  There
  38. > : is no such requirement on C implementations; why should there be
  39. > : such a requirement on C++ implementations?
  40.  
  41. >     Again, so all those libraries I link with my C code must
  42. > be figments of my imagination.  It would be just too hard to 
  43. > agree on a standard implementation.
  44.  
  45. It is easy for vendors to agree with each other on an implementation
  46. strategy, if that is what they want to do.  It is much more difficult
  47. to write down rules for testing implementations (which is what standards
  48. are) with the property that conforming to the rules will guarantee
  49. compatibility.
  50.  
  51. If vendors want to be compatible with each other, no standard is
  52. necessary.  If they want to be incompatible in areas ouside the
  53. language proper, it is hard to understand how any standard can
  54. prevent them from doing so.
  55.  
  56. > : Or what if I write a linker that does not use name mangling at
  57. > : all, but instead stores types in its symbol table?  Would you
  58. > : reject such a linker because it does not mangle names properly?
  59.  
  60. >     Agast!  That couldn't possibly be part of the standard!
  61.  
  62. Please answer the question.
  63.  
  64. > : Of, for a third example, consider a compiler and linker that does
  65. > : follow the hypothetical name-mangling standard, but gives its users
  66. > : no way of determining what names it actually uses?  Does such a
  67. > : compiler/linker pair conform?  How can you tell?  How can you test
  68. > : conformance?
  69.  
  70. >     I may be really stupid, but I don't understand at all what you
  71. > mean here.  Wouldn't the names it uses be determined by the name mangling
  72. > standard?
  73.  
  74. If you can't convince it to tell you what names it uses, how can
  75. you determine whether it conforms to the standard or not?
  76.  
  77. > : Indeed.  But having a name-mangling standard would not affect this.
  78.  
  79. >     Yes it would.  it wou;dn't clear up every concievable possible
  80. > theoretical problem, but it would be another big problem out of the
  81. > way of simpl distribution of libraries, object files, etc.
  82.  
  83. So you claim -- but I have yet to see any evidence to support that claim.
  84. -- 
  85.                 --Andrew Koenig
  86.                   ark@research.att.com
  87.